package com.carpedil.sm.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.carpedil.sm.po.User;
import org.springframework.stereotype.Repository;

import java.util.List;

/** @author Administrator */
@Repository
public interface UserService {
  /**
   * insertUser
   *
   * @param user user
   * @return i
   */
  boolean insertUser(User user);

  /**
   * deleteUserById
   *
   * @param id id
   * @return i
   */
  boolean deleteUserById(Integer id);
  /**
   * updateUser
   *
   * @param user user
   * @return i
   */
  boolean updateUser(User user);

  /**
   * getUsersByCondition
   *
   * @param id id
   * @param name name
   * @param nickName nickName
   * @return Users
   */
  List<User> getUsersByCondition(Integer id, String name, String nickName);

  /**
   * getUsersByPage
   *
   * @param pageNo pageNo
   * @param pageSize pageSize
   * @return IPage<User>
   */
  IPage<User> getUsersByPage(Integer pageNo, Integer pageSize);

  /**
   * getUsersByPageLink
   *
   * @param pageNo pageNo
   * @param pageSize pageSize
   * @param roleId roleId
   * @return IPage<User>
   */
  IPage<User> getUsersByPageParam(Integer pageNo, Integer pageSize, Integer roleId);
}
